define("dojox/form/Rating_disabledFix","dojo/_base/declare,dojo/_base/lang,dojo/dom-attr,dojo/dom-class,dojo/mouse,dojo/on,dojo/string,dojo/query,dijit/form/_FormWidget".split(","),
		function(i,f,g,e,j,d,h,k,l)
{
		return i("dojox.form.Rating_disabledFix",l,{templateString:null,numStars:5,value:0,
		
		/*
		 * add disabled property
		 * */
		disabled: false,
			
		buildRendering:function(a){
			for(var b="",c=0;c<this.numStars;c++)
				b += h.substitute('<li class="dojoxRatingStar dijitInline" value="${value}"></li>',{value:c+1});this.templateString=h.substitute('<div dojoAttachPoint="domNode" class="dojoxRating dijitInline"><input type="hidden" value="0" dojoAttachPoint="focusNode" /><ul data-dojo-attach-point="list">${stars}</ul></div>',{stars:b});
				this.inherited(arguments);
		},

		postCreate: function(){
			this.inherited(arguments);
			this._renderStars(this.value);
			this.own(d(this.list,d.selector(".dojoxRatingStar","mouseover"),f.hitch(this,"_onMouse")),d(this.list,d.selector(".dojoxRatingStar","click"),f.hitch(this,"onStarClick")),d(this.list,j.leave,f.hitch(this,function(){this._renderStars(this.value);
			})));
		},
		_onMouse:function(a){
			/*
			 * add check to see if disabled. This will stop the stars from rendering when hovering over them after the widget is disbaled
			 * */
			if(!this.disabled){
				var b=+g.get(a.target,"value");
				this._renderStars(b,!0);
				this.onMouseOver(a,b);
			}
		},
		_renderStars:function(a,b){
				k(".dojoxRatingStar",
					this.domNode).forEach(function(c,d){d+1>a?(e.remove(c,"dojoxRatingStarHover"),e.remove(c,"dojoxRatingStarChecked")):(e.remove(c,"dojoxRatingStar"+(b?"Checked":"Hover")),e.add(c,"dojoxRatingStar"+(b?"Hover":"Checked")));
					});
		},
		onStarClick:function(a){
			/*
			 * add check to see if disabled. This will stop the rating widget from getting new values after the widget is disabled
			 * */
			if(!this.disabled){
				a = +g.get(a.target,"value");
				this.setAttribute("value",a==this.value?0:a);
				this._renderStars(this.value);
				this.onChange(this.value);
			}
		},

		onMouseOver:function(){
			
		},
		setAttribute:function(a,b){
			this.set(a,b);
		},
		_setValueAttr:function(a){
			this.focusNode.value=a;this._set("value",a);
			this._renderStars(a);
			this.onChange(a);
		}
	});
});

